package com.lpf.facade;

// 客户端代码
public class FacadePatternDemo {
    public static void main(String[] args) {
        // 创建子系统对象
        DvdPlayer dvdPlayer = new DvdPlayer();
        Projector projector = new Projector();
        Lights lights = new Lights();

        // 创建外观对象
        HomeTheaterFacade homeTheater = new HomeTheaterFacade(dvdPlayer, projector, lights);

        // 使用外观对象观看电影
        homeTheater.watchMovie("Inception");

        // 结束电影
        homeTheater.endMovie();
    }
}